﻿using HDSmartCommunity.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace HDSmartCommunity.DAL
{
    public class ParamDAL
    {
        public List<ParamType> GetParamType()
        {
            string strSql = "SELECT * FROM paramtype";

            CommFN<ParamType> fn = new CommFN<ParamType>();
            return fn.GetDataList(strSql);
        }

        public int GetMode()
        {
            string strSql = "SELECT workmode FROM devinfo";

            CommFN<ParamType> fn = new CommFN<ParamType>();
            return Convert.ToInt32(fn.ExecuteScalar(strSql));
        }
    }
}
